<include file="./Public/Home/header.html" />
<div class="message">

        <div class="messageContent">
            <div class="messageTitle"></div>
            <div class="messageBox">
                <div class="messageName">
                    <p>勇敢的士兵们，亲爱的家长们，有什么想跟绿贝雷说的吗？欢迎留言！我们定会珍视每条建议！</p>
                </div>
                <textarea id="in_mess" name="mess"></textarea>
            </div>
            <div class="message_btn">
                <button id="mess_sub" type="submit">确定</button>
                <a href="javascript:history.go(-1)">返回</a>
            </div>
        </div>
    <include file="./Public/Home/nav.html" />
</div>
<include file="./Public/Home/footer.html" />
<script>
    $('#mess_sub').click(function () {
        var message = $('#in_mess').val();

        $.ajax({url:"addMessage",type:'post',data:{mess:message},dataType:"json",success:function(result){

            if (result == 1) {
                var name = "成功";
                var content = "留言成功";
                var url = "{:U('UserCenter/center')}";
                Prompt(name,content,url);
            } else {
                name = "失败"
                content = "留言失败";
                url = "index";
                Prompt(name,content,url);

            }
        }});
    })
</script>